<template>
    <div>
        dddd
        <img :src="imgSrc" :class="className">
    </div>
</template>
<script lang="ts">
    import {Component, Prop, Vue, Watch} from 'vue-property-decorator';
    import {getSrc} from '@/utils/tool';
    @Component
    export default class WebpImage extends Vue {
        @Prop()
        private src: any;
        private className: string = '';
        imgSrc: string = '';
        mounted() {}
        @Watch('src', {immediate: true, deep: true})
        watchitem(newVal: any = {}): void {
            this.imgSrc = getSrc(newVal, 80, '');
            console.log(this.imgSrc);
        }
    }
</script>
<style lang="less" scoped>
</style>
